Last updated: 2020-11-10
Checks: 7 0
Knit directory: T47D_ZR75_DHT_StrippedSerum_RNASeq/analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(12345) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 0858644. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: .snakemake/
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/qc_raw.Rmd) and HTML (docs/qc_raw.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | 7d3cf7f | Steve Ped | 2020-11-10 | Added count merging |
| html | ef81e6a | Steve Ped | 2020-11-10 | Build site. |
| html | 24c2e2f | Steve Ped | 2020-11-10 | Build site. |
| Rmd | 13c3089 | Steve Ped | 2020-11-10 | Recompiled pre-alignment qc |
| html | 6985f16 | Steve Ped | 2020-11-09 | Build site. |
| Rmd | 30ecf4f | Steve Ped | 2020-11-09 | Corrected errors |
| html | c8e1455 | Steve Ped | 2020-11-09 | Build site. |
| Rmd | fda3bb2 | Steve Ped | 2020-11-09 | Rewrote qc_raw |
| html | ea635ab | Steve Ped | 2020-11-09 | Build site. |
| Rmd | 8d91bfc | Steve Ped | 2020-11-09 | Rewrote qc_raw |
| html | 3502d11 | Steve Ped | 2020-11-09 | Build site. |
| Rmd | 9d03800 | Steve Ped | 2020-11-09 | Added tabsets for both runs |
| Rmd | 6f7af53 | Steve Pederson | 2020-11-06 | Initial Commit |
library(ngsReports)
library(tidyverse)
library(yaml)
library(scales)
library(pander)
library(glue)
library(plotly)
library(msa)
panderOptions("table.split.table", Inf)
panderOptions("big.mark", ",")
theme_set(theme_bw())
config <- here::here("config/config.yml") %>%
read_yaml()
suffix <- paste0(config$tags$tag, config$ext)
sp <- config$ref$species %>%
str_replace("(^[a-z])[a-z]*_([a-z]+)", "\\1\\2") %>%
str_to_title()
runRegEx <- paste(str_split(config$runs, " ")[[1]], collapse = "|")
samples <- config$samples %>%
here::here() %>%
read_tsv() %>%
mutate(
R1 = paste0(sample, config$tags$r1, suffix),
R2 = paste0(sample, config$tags$r2, suffix),
) %>%
pivot_longer(
cols = c("R1", "R2"),
names_to = "Reads",
values_to = "Filename"
) %>%
mutate_if(
function(x){length(unique(x)) < length(x)},
as.factor
)
config$analysis <- config$analysis %>%
lapply(intersect, y = colnames(samples)) %>%
.[vapply(., length, integer(1)) > 0]
if (length(config$analysis)) {
samples <- samples %>%
unite(
col = group,
any_of(as.character(unlist(config$analysis))),
sep = "_", remove = FALSE
)
} else {
samples$group <- samples$Filename
}
group_cols <- hcl.colors(
n = length(unique(samples$group)),
palette = "Zissou 1"
) %>%
setNames(unique(samples$group))
fh <- round(6 + nrow(samples) / 7, 0)
rawFqc <- here::here("data/raw/FastQC") %>%
list.files(pattern = "fastqc.zip", full.names = TRUE, recursive = TRUE) %>%
FastqcDataList() %>%
.[fqName(.) %in% samples$Filename]
for (i in seq_along(rawFqc)){
run <- str_extract(path(rawFqc[[i]]), runRegEx)
rawFqc[[i]]@Summary$Filename <- paste(run, rawFqc[[i]]@Summary$Filename, sep = "/")
}
plotSummary(rawFqc)
Overall summary of FastQC reports
A total of 64 libraries were contained in this dataset, with read totals ranging between 5,699,001 and 28,623,352 reads.
Across all libraries, reads were between 35 and 101 bases. This does indicate some read trimming had been performed prior to that undertaken here.
plotReadTotals(rawFqc, pattern = suffix, usePlotly = TRUE)
Library Sizes for all supplied fastq files. Any samples run as multiple libraries are shown as the supplied multiple libraries and have not been merged.
plotBaseQuals(
rawFqc,
pattern = suffix,
usePlotly = TRUE,
dendrogram = TRUE,
cluster = TRUE
)
Mean sequencing quality scores at each base position for each library
GC content patterns for both R1 and R2 reads were highly reminiscent of those seen when rRNA has not been completely removed.
plotGcContent(rawFqc[grepl("R1", fqName(rawFqc))], plotType = "line", usePlotly = TRUE, gcType = "Trans")
GC content for all R1 libraries
plotGcContent(rawFqc[grepl("R2", fqName(rawFqc))], plotType = "line", usePlotly = TRUE, gcType = "Trans")
GC content for all R2 libraries
plotly::ggplotly(
getModule(rawFqc, module = "Per_base_sequence_content") %>%
mutate(Base = fct_inorder(Base)) %>%
group_by(Base) %>%
mutate(
across(c("A", "C", "G", "T"), function(x){x - mean(x)})
) %>%
pivot_longer(
cols = c("A", "C", "G", "T"),
names_to = "Nuc",
values_to = "resid"
) %>%
separate(Filename, into = c("Run", "Filename"), sep = "/") %>%
left_join(samples) %>%
unite(Filename, Run, Filename, sep = "/") %>%
ggplot(
aes(Base, resid, group = Filename, colour = group)
) +
geom_line() +
facet_wrap(~Nuc) +
scale_colour_manual(values = group_cols) +
labs(
x = "Read Position", y = "Residual", colour = "Group"
)
)
Base and Position specific residuals for each sample. The mean base content at each position was calculated for each nucleotide, and the sample-specific residuals calculated.
plotAdapterContent(
x = rawFqc,
pattern = suffix,
usePlotly = TRUE,
dendrogram = TRUE,
cluster = TRUE
)
Total Adapter Content for each sample shown by starting position in the read.
os <- suppressMessages(getModule(rawFqc, "Over"))
os_fh <- min(20, 6 + nrow(os) / 20)
if (nrow(os)){
if (length(unique(os$Filename)) > 1){
suppressMessages(
plotOverrep(
x = rawFqc,
pattern = suffix,
usePlotly = TRUE,
dendrogram = TRUE,
cluster = TRUE
)
)
}
}
Summary of over-represented sequences across all libraries
os %>%
group_by(Sequence, Possible_Source) %>%
summarise(
`Found in` = n(),
Total = sum(Count),
`Largest Percent` = glue("{round(max(Percentage), 2)}%")
) %>%
ungroup() %>%
arrange(desc(Total)) %>%
dplyr::filter(Total > 5e5) %>%
mutate(Rank = seq_along(Total)) %>%
dplyr::select(Rank, everything()) %>%
pander(
caption = "*Summary of most abundant over-represented sequences within the raw data.*"
)
| Rank | Sequence | Possible_Source | Found in | Total | Largest Percent |
|---|---|---|---|---|---|
| 1 | CCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATG | No Hit | 32 | 2,775,012 | 0.88% |
| 2 | CTGGAGTCTTGGAAGCTTGACTACCCTACGTTCTCCTACAAATGGACCTT | No Hit | 32 | 1,869,452 | 0.64% |
| 3 | CTCCGTTTCCGACCTGGGCCGGTTCACCCCTCCTTAGGCAACCTGGTGGT | No Hit | 32 | 1,667,442 | 0.53% |
| 4 | CTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGA | No Hit | 32 | 1,551,495 | 0.63% |
| 5 | CCCCTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATAT | No Hit | 32 | 1,505,323 | 0.53% |
| 6 | CCCTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATT | No Hit | 32 | 1,382,213 | 0.5% |
| 7 | CTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATGC | No Hit | 30 | 1,173,525 | 0.47% |
| 8 | CCCAAACCCACTCCACCTTACTACCAGACAACCTTAGCCAAACCATTTAC | No Hit | 16 | 1,082,742 | 0.56% |
| 9 | CTTGGTTATAATTTTTCATCTTTCCCTTGCGGTACTATATCTATTGCGCC | No Hit | 30 | 1,075,631 | 0.51% |
| 10 | CTCTCTACAAGGTTTTTTCCTAGTGTCCAAAGAGCTGTTCCTCTTTGGAC | No Hit | 32 | 1,048,457 | 0.35% |
| 11 | CCAGGCTGGAGTGCAGTGGCTATTCACAGGCGCGATCCCACTACTGATCA | No Hit | 26 | 1,042,034 | 0.53% |
| 12 | CCTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTG | No Hit | 32 | 989,640 | 0.31% |
| 13 | CTTATTTCTCTTGTCCTTTCGTACAGGGAGGAATTTGAAGTAGATAGAAA | No Hit | 32 | 925,237 | 0.35% |
| 14 | CTGAACTCCTCACACCCAATTGGACCAATCTATCACCCTATAGAAGAACT | No Hit | 32 | 893,807 | 0.3% |
| 15 | CTGGGCTGTAGTGCGCTATGCCGATCGGGTGTCCGCACTAAGTTCGGCAT | No Hit | 30 | 830,226 | 0.26% |
| 16 | CTCTAGAATAGGATTGCGCTGTTATCCCTAGGGTAACTTGTTCCGTTGGT | No Hit | 31 | 828,390 | 0.27% |
| 17 | CGGGGGAAGGCGCTTTGTGAAGTAGGCCTTATTTCTCTTGTCCTTTCGTA | No Hit | 32 | 800,786 | 0.37% |
| 18 | CCCAGCTACTCGGGAGGCTGAGGCTGGAGGATCGCTTGAGTCCAGGAGTT | No Hit | 32 | 797,383 | 0.25% |
| 19 | CTCCGAGGTCGCCCCAACCGAAATTTTTAATGCAGGTTTGGTAGTTTAGG | No Hit | 32 | 778,604 | 0.25% |
| 20 | CTGGTTTCGGGGGTCTTAGCTTTGGCTCTCCTTGCAAAGTTATTTCTAGT | No Hit | 30 | 777,092 | 0.29% |
| 21 | CTTGAGTCCAGGAGTTCTGGGCTGTAGTGCGCTATGCCGATCGGGTGTCC | No Hit | 30 | 768,861 | 0.23% |
| 22 | CGTTGGTCAAGTTATTGGATCAATTGAGTATAGTAGTTCGCTTTGACTGG | No Hit | 30 | 740,767 | 0.22% |
| 23 | CCCAAACCCACTCCACCCTACTACCAGACAACCTTAGCCAAACCATTTAC | No Hit | 16 | 729,714 | 0.4% |
| 24 | GTTCTGGGCTGTAGTGCGCTATGCCGATCGGGTGTCCGCACTAAGTTCGG | No Hit | 30 | 725,496 | 0.23% |
| 25 | CTCAGGCTGGAGTGCAGTGGCTATTCACAGGCGCGATCCCACTACTGATC | No Hit | 25 | 719,900 | 0.27% |
| 26 | CAGGCTGGAGTGCAGTGGCTATTCACAGGCGCGATCCCACTACTGATCAG | No Hit | 25 | 699,697 | 0.27% |
| 27 | CTTTAATCGTTGAACAAACGAACCTTTAATAGCGGCTGCACCATCGGGAT | No Hit | 31 | 691,249 | 0.21% |
| 28 | CTACAATCAACCAACAAGTCATTATTACCCTCACTGTCAACCCAACACAG | No Hit | 32 | 664,586 | 0.21% |
| 29 | CCCTGTTCTTGGGTGGGTGTGGGTATAATGCTAAGTTGAGATGATATCAT | No Hit | 15 | 659,116 | 0.47% |
| 30 | CCCTGTTCTTGGGTGGGTGTGGGTATAATACTAAGTTGAGATGATATCAT | No Hit | 15 | 641,218 | 0.4% |
| 31 | GTCCAATTGGGTGTGAGGAGTTCAGTTATATGTTTGGGATTTTTTAGGTA | No Hit | 25 | 620,097 | 0.29% |
| 32 | CTCTAAATCCCCTTGTAAATTTAACTGTTAGTCCAAAGAGGAACAGCTCT | No Hit | 28 | 617,871 | 0.23% |
| 33 | CTCATTTGGATGTGTCTGGAGTCTTGGAAGCTTGACTACCCTACGTTCTC | No Hit | 29 | 610,661 | 0.24% |
| 34 | CCTCGATGTTGGATCAGGACATCCCGATGGTGCAGCCGCTATTAAAGGTT | No Hit | 29 | 604,876 | 0.19% |
| 35 | GTATAATACTAAGTTGAGATGATATCATTTACGGGGGAAGGCGCTTTGTG | No Hit | 16 | 600,508 | 0.44% |
| 36 | CGCTTGAGTCCAGGAGTTCTGGGCTGTAGTGCGCTATGCCGATCGGGTGT | No Hit | 29 | 589,770 | 0.21% |
| 37 | CTCAGACCGCGTTCTCTCCCTCTCACTCCCCAATACGGAGAGAAGAACGA | No Hit | 23 | 589,407 | 0.31% |
| 38 | GCTACCTTTGCACGGTTAGGGTACCGCGGCCGTTAAACATGTGTCACTGG | No Hit | 23 | 564,289 | 0.21% |
| 39 | CACCAGGTTGCCTAAGGAGGGGTGAACCGGCCCAGGTCGGAAACGGAGCA | No Hit | 26 | 551,677 | 0.21% |
| 40 | GTGGGTATAATGCTAAGTTGAGATGATATCATTTACGGGGGAAGGCGCTT | No Hit | 15 | 547,997 | 0.37% |
| 41 | CTTTCGTACAGGGAGGAATTTGAAGTAGATAGAAACCGACCTGGATTACT | No Hit | 26 | 543,299 | 0.22% |
| 42 | CGCGTGCCTGTAGTCCCAGCTACTCGGGAGGCTGAGGCTGGAGGATCGCT | No Hit | 27 | 517,875 | 0.17% |
| 43 | GTAAGATTTGCCGAGTTCCTTTTACTTTTTTTAACCTTTCCTTATGGGCA | No Hit | 15 | 501,227 | 0.33% |
os %>%
group_by(Sequence, Possible_Source) %>%
summarise(
Total = sum(Count), .groups = "drop"
) %>%
arrange(desc(Total)) %>%
pull("Sequence") %>%
setNames(paste0("os", seq_along(.))) %>%
str_subset("TGGTCCCCCGCTCCCGGGAGG") %>%
as("DNAStringSet") %>%
msa() %>%
as("DNAStringSet")
use default substitution matrix
DNAStringSet object of length 9:
width seq
[1] 66 CCCCTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATAT----------------
[2] 66 -CCCTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATT---------------
[3] 66 --CCTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTG--------------
[4] 66 ---CTCCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGA-------------
[5] 66 -----CCTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATG-----------
[6] 66 -----ACTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATG-----------
[7] 66 ------CTTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATGC----------
[8] 66 ------ATTAGGCAACCTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATGC----------
[9] 66 ----------------CTGGTGGTCCCCCGCTCCCGGGAGGTCACCATATTGATGCCGAACTTAGT
A BLAST search of 10 manually selected sequences (which are clearly the same sequence) revealed this to be a perfect match to multiple genomic locations such as RPS29, RN7SL3, NEMF and RN7SL396P. It is clear that this is likely to have some association with rRNA.
os %>%
group_by(Sequence, Possible_Source) %>%
summarise(
Total = sum(Count), .groups = "drop"
) %>%
ungroup() %>%
arrange(desc(Total)) %>%
pull("Sequence") %>%
setNames(paste0("os", seq_along(.))) %>%
str_subset("TATTTCTCTTGTCCTTTCGTA") %>%
as("DNAStringSet") %>%
msa() %>%
as("DNAStringSet")
use default substitution matrix
DNAStringSet object of length 7:
width seq
[1] 77 CGGGGGAAGGCGCTTTGTGAAGTAGGCCTTATTT...TTCGTA---------------------------
[2] 77 AGGGGGAAGGCGCTTTGTGAAGTAGGCCTTATTT...TTCGTA---------------------------
[3] 77 -GGGGGAAGGCGCTTTGTGAAGTAGGCCTTATTT...TTCGTAC--------------------------
[4] 77 -AGGGGAAGGCGCTTTGTGAAGTAGGCCTTATTT...TTCGTAC--------------------------
[5] 77 ---------------------------CTTATTT...TTCGTACAGGGAGGAATTTGAAGTAGATAGAAA
[6] 77 --------------------------CCTTATTT...TTCGTACAGGGAGGAATTTGAAGTAGATAGAA-
[7] 77 -------------------------GCCTTATTT...TTCGTACAGGGAGGAATTTGAAGTAGATAGA--
A manual search using additional over-represented sequences which did not align to the above consensus, revealed matches to additional SRP RNAs and 7S RNA
As such, rRNA may present some issues for this dataset as these sequences will not be removed by adapter removal. Alignment to a rRNA genome may be of benefit.
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8
[7] LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] msa_1.22.0 Biostrings_2.58.0 XVector_0.30.0
[4] IRanges_2.24.0 S4Vectors_0.28.0 plotly_4.9.2.1
[7] glue_1.4.2 pander_0.6.3 scales_1.1.1
[10] yaml_2.2.1 forcats_0.5.0 stringr_1.4.0
[13] dplyr_1.0.2 purrr_0.3.4 readr_1.4.0
[16] tidyr_1.1.2 tidyverse_1.3.0 ngsReports_1.6.0
[19] tibble_3.0.4 ggplot2_3.3.2 BiocGenerics_0.36.0
[22] workflowr_1.6.2
loaded via a namespace (and not attached):
[1] colorspace_1.4-1 hwriter_1.3.2
[3] ellipsis_0.3.1 rprojroot_1.3-2
[5] GenomicRanges_1.42.0 ggdendro_0.1.22
[7] fs_1.5.0 rstudioapi_0.11
[9] farver_2.0.3 ggrepel_0.8.2
[11] DT_0.16 fansi_0.4.1
[13] lubridate_1.7.9 xml2_1.3.2
[15] leaps_3.1 knitr_1.30
[17] jsonlite_1.7.1 Cairo_1.5-12.2
[19] Rsamtools_2.6.0 broom_0.7.2
[21] cluster_2.1.0 dbplyr_2.0.0
[23] png_0.1-7 compiler_4.0.3
[25] httr_1.4.2 backports_1.2.0
[27] assertthat_0.2.1 Matrix_1.2-18
[29] lazyeval_0.2.2 cli_2.1.0
[31] later_1.1.0.1 htmltools_0.5.0
[33] tools_4.0.3 gtable_0.3.0
[35] GenomeInfoDbData_1.2.4 reshape2_1.4.4
[37] FactoMineR_2.3 ShortRead_1.48.0
[39] Rcpp_1.0.5 Biobase_2.50.0
[41] cellranger_1.1.0 vctrs_0.3.4
[43] crosstalk_1.1.0.1 xfun_0.19
[45] rvest_0.3.6 lifecycle_0.2.0
[47] zlibbioc_1.36.0 MASS_7.3-53
[49] zoo_1.8-8 hms_0.5.3
[51] promises_1.1.1 MatrixGenerics_1.2.0
[53] SummarizedExperiment_1.20.0 RColorBrewer_1.1-2
[55] latticeExtra_0.6-29 stringi_1.5.3
[57] highr_0.8 BiocParallel_1.24.0
[59] GenomeInfoDb_1.26.0 rlang_0.4.8
[61] pkgconfig_2.0.3 matrixStats_0.57.0
[63] bitops_1.0-6 evaluate_0.14
[65] lattice_0.20-41 labeling_0.4.2
[67] GenomicAlignments_1.26.0 htmlwidgets_1.5.2
[69] tidyselect_1.1.0 here_0.1
[71] plyr_1.8.6 magrittr_1.5
[73] R6_2.5.0 generics_0.1.0
[75] DelayedArray_0.16.0 DBI_1.1.0
[77] pillar_1.4.6 haven_2.3.1
[79] whisker_0.4 withr_2.3.0
[81] scatterplot3d_0.3-41 RCurl_1.98-1.2
[83] modelr_0.1.8 crayon_1.3.4
[85] rmarkdown_2.5 jpeg_0.1-8.1
[87] grid_4.0.3 readxl_1.3.1
[89] data.table_1.13.2 git2r_0.27.1
[91] reprex_0.3.0 digest_0.6.27
[93] flashClust_1.01-2 httpuv_1.5.4
[95] munsell_0.5.0 viridisLite_0.3.0